import xadmin
from .models import Banner, Peugeot


class BannerAdmin(object):
    list_display = ['title', 'image', 'url', 'index', 'add_time']
    search_fields = ['title', 'image', 'url', 'index']
    list_filter = ['title', 'image', 'url', 'index', 'add_time']
    model_icon = 'fa fa-group'


class PeugeotAdmin(object):
    list_display = ['Wechat_image', 'official_number', 'notice', "logo", "copyright", "file_num"]
    search_fields = ['Wechat_image', 'official_number', 'notice', "logo", "copyright", "file_num"]
    # list_filter = ['title', 'image', 'url', 'index', 'add_time']
    model_icon = 'fa fa-group'


xadmin.site.register(Banner, BannerAdmin)
xadmin.site.register(Peugeot, PeugeotAdmin)
